home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 48 / PC Gamer IT CD 48 1-2.iso / age2 / AoE2demo.exe / 1033 / CABFILE / MSGAME.CAB / Data / gamedata.drs / Unnamed File 000007.bina < prev    next >
Text File  |  1999-10-01  |  18KB  |  813 lines

  1. (defrule
  2.     (goal siege-available YES)
  3.     (or
  4.         (building-type-count siege-workshop > 0)
  5.         (building-type-count castle > 0)
  6.     )
  7.     (or
  8.         (or
  9.             (players-building-type-count any-enemy watch-tower-line > 1)
  10.             (players-building-type-count any-enemy castle > 0)
  11.         )
  12.         (or
  13.             (players-building-type-count any-enemy bombard-tower > 0)
  14.             (players-building-type-count any-enemy town-center > 1)
  15.         )
  16.     )
  17. =>
  18.     (set-goal siege-available NO)
  19. )
  20.  
  21. (defrule
  22.     (goal siege-available YES)
  23.     (or
  24.         (players-building-type-count any-enemy stone-wall > 10)
  25.         (players-building-type-count any-enemy fortified-wall > 10)
  26.     )
  27. =>
  28.     (set-goal siege-available NO)
  29. )
  30.  
  31. (defrule
  32.     (goal siege-available NO)
  33.     (or
  34.         (population >= pop-cap)
  35.         (or
  36.             (or
  37.                 (unit-type-count mangonel-line > 0)
  38.                 (unit-type-count battering-ram-line > 0)
  39.             )
  40.             (or
  41.                 (unit-type-count bombard-cannon > 0)
  42.                 (unit-type-count trebuchet > 0)
  43.             )
  44.         )
  45.     )
  46. =>
  47.     (set-goal siege-available YES)
  48. )
  49.  
  50. (defrule
  51.     (goal siege-available NO)
  52.     (goal 1 10)
  53.     (unit-type-count cannon-galleon > 1)
  54. =>
  55.     (set-goal siege-available YES)
  56. )
  57.  
  58. (defrule
  59.     (goal soldiers-available NO)
  60.     (or
  61.         (or
  62.             (unit-type-count militiaman-line > five-percent-pop)
  63.             (unit-type-count knight-line > five-percent-pop)
  64.         )
  65.         (or
  66.             (or
  67.                 (unit-type-count scout-cavalry-line > five-percent-pop)
  68.                 (unit-type-count cavalry-archer-line > five-percent-pop)
  69.             )
  70.             (or
  71.                 (unit-type-count archer-line > five-percent-pop)
  72.                 (unit-type-count my-unique-unit-line > five-percent-pop)
  73.             )
  74.         )
  75.     )
  76. =>
  77.     (set-goal soldiers-available YES)
  78. )
  79.  
  80. (defrule
  81.     (goal soldiers-available YES)
  82.     (nor
  83.         (or
  84.             (unit-type-count militiaman-line > five-percent-pop)
  85.             (unit-type-count knight-line > five-percent-pop)
  86.         )
  87.         (or
  88.             (or
  89.                 (unit-type-count scout-cavalry-line > five-percent-pop)
  90.                 (unit-type-count cavalry-archer-line > five-percent-pop)
  91.             )
  92.             (or
  93.                 (unit-type-count archer-line > five-percent-pop)
  94.                 (unit-type-count my-unique-unit-line > five-percent-pop)
  95.             )
  96.         )
  97.     )
  98. =>
  99.     (set-goal soldiers-available NO)
  100. )
  101.  
  102. ;*****************************************
  103. ;MANGONEL/ONAGER
  104.  
  105. (defrule
  106.     (goal siege-available NO)
  107.     (can-train-with-escrow mangonel-line)
  108.     (nor
  109.         (can-train mangonel-line)
  110.         (goal upgrade-conflict NOTICE)
  111.     )
  112. =>
  113.     (release-escrow wood)
  114.     (release-escrow gold)
  115.     (train mangonel-line)
  116. )
  117.  
  118. (defrule
  119.     (goal soldiers-available YES)
  120.     (unit-type-count-total mangonel-line < five-percent-pop)
  121.     (can-train mangonel-line)
  122.     (not (unit-available bombard-cannon) )
  123. =>
  124.     (train mangonel-line)
  125. )
  126.  
  127. (defrule
  128.     (goal archer-upgrades YES)
  129.     (goal soldiers-available YES)
  130.     (difficulty <= hard)
  131.     (unit-type-count-total mangonel-line < ten-percent-pop)
  132.     (can-train mangonel-line)
  133.     (research-completed ri-onager)
  134.     (or
  135.         (cc-players-building-type-count any-enemy watch-tower-line > 2)
  136.         (or
  137.             (cc-players-building-type-count any-enemy castle > 0)
  138.             (cc-players-building-type-count any-enemy town-center > 1)
  139.         )
  140.     )
  141.     (not (unit-available bombard-cannon) )
  142. =>
  143.     (train mangonel-line)
  144. )
  145.  
  146. (defrule
  147.     (goal soldiers-available YES)
  148.     (unit-type-count-total mangonel-line < ten-percent-pop)
  149.     (can-train siege-onager)
  150. =>
  151.     (train siege-onager)
  152. )
  153. ;****************************************
  154. ;RAMS
  155.  
  156. (defrule
  157.     (goal siege-available NO)
  158.     (can-train-with-escrow battering-ram-line)
  159.     (nor
  160.         (can-train battering-ram-line)
  161.         (or
  162.             (goal upgrade-conflict NOTICE)
  163.             (town-under-attack)
  164.         )
  165.     )
  166. =>
  167.     (release-escrow wood)
  168.     (release-escrow gold)
  169.     (train battering-ram-line)
  170. )
  171.  
  172. (defrule
  173.     (goal soldiers-available YES)
  174.     (unit-type-count-total battering-ram-line < five-percent-pop)
  175.     (can-train battering-ram-line)
  176.     (nor
  177.         (unit-available bombard-cannon)
  178.         (town-under-attack)
  179.     )
  180. =>
  181.     (train battering-ram-line)
  182. )
  183.  
  184. (defrule
  185.     (goal soldiers-available YES)
  186.     (unit-type-count-total battering-ram-line < ten-percent-pop)
  187.     (cc-players-building-type-count any-enemy bombard-tower == 0)
  188.     (research-completed ri-capped-ram)
  189.     (can-train battering-ram)
  190.     (or
  191.         (cc-players-building-type-count any-enemy castle > 0)
  192.         (or
  193.             (cc-players-building-type-count any-enemy town-center > 1)
  194.             (cc-players-building-type-count any-enemy watch-tower-line > 2)
  195.         )
  196.     )
  197.     (nor
  198.         (unit-available bombard-cannon)
  199.         (town-under-attack)
  200.     )
  201. =>
  202.     (train battering-ram)
  203. )
  204.  
  205. (defrule
  206.     (goal soldiers-available YES)
  207.     (unit-type-count-total battering-ram-line < ten-percent-pop)
  208.     (can-train siege-ram)
  209.     (not (town-under-attack) )
  210. =>
  211.     (train siege-ram)
  212. )
  213.  
  214.  
  215. ;****************************************
  216. ;BOMBARD CANNONS
  217. (defrule
  218.     (goal siege-available NO)
  219.     (difficulty <= hard)
  220.     (can-train-with-escrow bombard-cannon)
  221.     (nor
  222.         (can-train bombard-cannon)
  223.         (or
  224.             (goal upgrade-conflict NOTICE)
  225.             (town-under-attack)
  226.         )
  227.     )
  228. =>
  229.     (release-escrow wood)
  230.     (release-escrow gold)
  231.     (train bombard-cannon)
  232.     (chat-local-to-self "bombard")
  233. )
  234.  
  235. (defrule
  236.     (goal soldiers-available YES)
  237.     (difficulty <= hard)
  238.     (unit-type-count-total bombard-cannon < five-percent-pop)
  239.     (can-train bombard-cannon)
  240.     (not (town-under-attack) )
  241. =>
  242.     (train bombard-cannon)
  243.     (chat-local-to-self "bombard")
  244. )
  245.  
  246. (defrule
  247.     (goal soldiers-available YES)
  248.     (difficulty <= hard)
  249.     (unit-type-count-total bombard-cannon < ten-percent-pop)
  250.     (can-train bombard-cannon)
  251.     (or
  252.         (soldier-count > twenty-percent-pop)
  253.         (map-type black-forest)
  254.     )
  255.     (not (town-under-attack) )
  256. =>
  257.     (train bombard-cannon)
  258.     (chat-local-to-self "bombard")
  259. )
  260.  
  261. ;***********************
  262. ;TREBUCHETS
  263. (defrule
  264.     (goal siege-available NO)
  265.     (can-train-with-escrow trebuchet)
  266.     (nor
  267.         (can-train trebuchet)
  268.         (or
  269.             (goal upgrade-conflict NOTICE)
  270.             (town-under-attack)
  271.         )
  272.     )
  273. =>
  274.     (release-escrow wood)
  275.     (release-escrow gold)
  276.     (train trebuchet)
  277. )
  278.  
  279. (defrule
  280.     (goal soldiers-available YES)
  281.     (unit-type-count-total trebuchet < 3)
  282.     (soldier-count > fifteen-percent-pop)
  283.     (can-train trebuchet)
  284.     (not (town-under-attack) )
  285. =>
  286.     (train trebuchet)
  287. )
  288.  
  289. (defrule
  290.     (goal soldiers-available YES)
  291.     (unit-type-count-total trebuchet < 3)
  292.     (can-train-with-escrow trebuchet)
  293.     (nor 
  294.         (can-train trebuchet)
  295.         (or
  296.             (goal upgrade-conflict NOTICE)
  297.             (town-under-attack)
  298.         )
  299.     )
  300.     (or
  301.         (cc-players-building-type-count any-enemy town-center > 1)
  302.         (map-type black-forest)
  303.     )
  304. =>
  305.     (release-escrow wood)
  306.     (release-escrow gold)
  307.     (train trebuchet)
  308. )
  309.  
  310. (defrule
  311.     (goal soldiers-available YES)
  312.     (unit-type-count-total trebuchet < 3)
  313.     (can-train-with-escrow trebuchet)
  314.     (nor 
  315.         (can-train trebuchet)
  316.         (or
  317.             (goal upgrade-conflict NOTICE)
  318.             (town-under-attack)
  319.         )
  320.     )
  321.     (or
  322.         (cc-players-building-type-count any-enemy castle > 0)
  323.         (cc-players-building-type-count any-enemy watch-tower-line > 3)
  324.     )
  325. =>
  326.     (release-escrow wood)
  327.     (release-escrow gold)
  328.     (train trebuchet)
  329. )
  330.  
  331. ;*********************************
  332. #load-if-not-defined DEATH-MATCH
  333.  
  334. ;build superunits
  335. (defrule
  336.     (current-age == imperial-age)
  337. =>
  338.     (disable-timer t-ageup)
  339.     (enable-timer t-ageup 30)
  340.     (disable-self)
  341. )
  342.  
  343. (defrule
  344.     (population < unit-max)
  345.     (timer-triggered  t-ageup)
  346.     (can-train my-unique-unit-line)
  347. =>
  348.     (train my-unique-unit-line)
  349.     (set-goal secondary-build 0)
  350. )
  351.  
  352. (defrule
  353.     (population < unit-max)
  354.     (timer-triggered  t-ageup)
  355.     (can-train champion)
  356. =>
  357.     (train champion)
  358.     (set-goal secondary-build 0)
  359. )
  360.  
  361. (defrule
  362.     (population < unit-max)
  363.     (timer-triggered  t-ageup)
  364.     (can-train paladin)
  365. =>
  366.     (train paladin)
  367.     (set-goal secondary-build 0)
  368. )
  369.  
  370. (defrule
  371.     (population < unit-max)
  372.     (timer-triggered  t-ageup)
  373.     (can-train heavy-cavalry-archer)
  374. =>
  375.     (train heavy-cavalry-archer)
  376.     (set-goal secondary-build 0)
  377. )
  378.  
  379. (defrule
  380.     (population < unit-max)
  381.     (timer-triggered  t-ageup)
  382.     (can-train hand-cannoneer)
  383. =>
  384.     (train hand-cannoneer)
  385.     (set-goal secondary-build 0)
  386. )
  387.  
  388. (defrule
  389.     (population < unit-max)
  390.     (timer-triggered  t-ageup)
  391.     (can-train arbalest)
  392.     (or
  393.         (goal secondary-build 0)
  394.         (not (unit-available hand-cannoneer) )
  395.     )
  396. =>
  397.     (train arbalest)
  398.     (set-goal secondary-build 1)
  399. )
  400.  
  401. (defrule
  402.     (current-age == imperial-age)
  403.     (timer-triggered  t-ageup)
  404. =>
  405.     (disable-timer t-ageup)
  406.     (enable-timer t-ageup 30)
  407. )
  408. #end-if
  409. ;******************************************************
  410. ;train specialty units
  411. (defrule
  412.     (unit-type-count-total camel-line < 1)
  413.     (can-train camel-line)
  414.     (or
  415.         (or
  416.             (cc-players-unit-type-count any-enemy knight-line >= five-percent-pop)
  417.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  418.         )
  419.         (or
  420.             (cc-players-unit-type-count any-enemy light-cavalry >= five-percent-pop)
  421.             (cc-players-unit-type-count any-enemy camel-line >= five-percent-pop)
  422.         )
  423.     )
  424.     (or
  425.         (goal siege-available YES)
  426.         (town-under-attack)
  427.     )
  428. =>
  429.     (train camel-line)
  430. )
  431.  
  432. (defrule
  433.     (unit-type-count-total camel-line < 1)
  434.     (can-train camel-line)
  435.     (or
  436.         (or
  437.             (cc-players-unit-type-count any-enemy cataphract-line >= five-percent-pop)
  438.             (cc-players-unit-type-count any-enemy war-elephant-line >= five-percent-pop)
  439.         )
  440.         (or
  441.             (cc-players-unit-type-count any-enemy mameluke-line >= five-percent-pop)
  442.             (cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
  443.         )
  444.     )
  445.     (or
  446.         (goal siege-available YES)
  447.         (town-under-attack)
  448.     )
  449. =>
  450.     (train camel-line)
  451. )
  452.  
  453. (defrule
  454.     (unit-type-count-total camel-line < five-percent-pop)
  455.     (can-train camel-line)
  456.     (or
  457.         (or
  458.             (cc-players-unit-type-count any-enemy knight-line >= ten-percent-pop)
  459.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  460.         )
  461.         (or
  462.             (cc-players-unit-type-count any-enemy light-cavalry >= ten-percent-pop)
  463.             (cc-players-unit-type-count any-enemy camel-line >= ten-percent-pop)
  464.         )
  465.     )
  466.     (or
  467.         (goal siege-available YES)
  468.         (town-under-attack)
  469.     )
  470. =>
  471.     (train camel-line)
  472. )
  473.  
  474. (defrule
  475.     (unit-type-count-total camel-line < five-percent-pop)
  476.     (can-train camel-line)
  477.     (or
  478.         (or
  479.             (cc-players-unit-type-count any-enemy cataphract-line >= ten-percent-pop)
  480.             (cc-players-unit-type-count any-enemy war-elephant-line >= ten-percent-pop)
  481.         )
  482.         (or
  483.             (cc-players-unit-type-count any-enemy mameluke-line >= ten-percent-pop)
  484.             (cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
  485.         )
  486.     )
  487.     (or
  488.         (goal siege-available YES)
  489.         (town-under-attack)
  490.     )
  491. =>
  492.     (train camel-line)
  493. )
  494.  
  495. (defrule
  496.     (unit-type-count-total spearman-line < 1)
  497.     (can-train spearman-line)
  498.     (or
  499.         (or
  500.             (cc-players-unit-type-count any-enemy knight-line >= five-percent-pop)
  501.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  502.         )
  503.         (or
  504.             (cc-players-unit-type-count any-enemy light-cavalry >= five-percent-pop)
  505.             (cc-players-unit-type-count any-enemy camel-line >= five-percent-pop)
  506.         )
  507.     )
  508.     (or
  509.         (goal siege-available YES)
  510.         (town-under-attack)
  511.     )
  512. =>
  513.     (train spearman-line)
  514. )
  515.  
  516. (defrule
  517.     (unit-type-count-total spearman-line < 1)
  518.     (can-train spearman-line)
  519.     (or
  520.         (or
  521.             (cc-players-unit-type-count any-enemy cataphract-line >= five-percent-pop)
  522.             (cc-players-unit-type-count any-enemy war-elephant-line >= five-percent-pop)
  523.         )
  524.         (or
  525.             (cc-players-unit-type-count any-enemy mameluke-line >= five-percent-pop)
  526.             (cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
  527.         )
  528.     )
  529.     (or
  530.         (goal siege-available YES)
  531.         (town-under-attack)
  532.     )
  533. =>
  534.     (train spearman-line)
  535. )
  536.  
  537. (defrule
  538.     (unit-type-count-total spearman-line < five-percent-pop)
  539.     (can-train spearman)
  540.     (or
  541.         (or
  542.             (cc-players-unit-type-count any-enemy knight-line >= ten-percent-pop)
  543.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  544.         )
  545.         (or
  546.             (cc-players-unit-type-count any-enemy light-cavalry >= ten-percent-pop)
  547.             (cc-players-unit-type-count any-enemy camel-line >= ten-percent-pop)
  548.         )
  549.     )
  550.     (or
  551.         (goal siege-available YES)
  552.         (town-under-attack)
  553.     )
  554. =>
  555.     (train spearman)
  556. )
  557.  
  558. (defrule
  559.     (unit-type-count-total spearman-line < five-percent-pop)
  560.     (can-train spearman-line)
  561.     (or
  562.         (or
  563.             (cc-players-unit-type-count any-enemy cataphract-line >= ten-percent-pop)
  564.             (cc-players-unit-type-count any-enemy war-elephant-line >= ten-percent-pop)
  565.         )
  566.         (or
  567.             (cc-players-unit-type-count any-enemy mameluke-line >= ten-percent-pop)
  568.             (cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
  569.         )
  570.     )
  571.     (or
  572.         (goal siege-available YES)
  573.         (town-under-attack)
  574.     )
  575. =>
  576.     (train spearman-line)
  577. )
  578.  
  579. (defrule
  580.     (unit-type-count-total skirmisher-line < 1)
  581.     (can-train skirmisher-line)
  582.     (or
  583.         (or
  584.             (cc-players-unit-type-count any-enemy archer-line >= five-percent-pop)
  585.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  586.         )
  587.         (or
  588.             (cc-players-unit-type-count any-enemy skirmisher-line >= five-percent-pop)
  589.             (cc-players-unit-type-count any-enemy hand-cannoneer >= five-percent-pop)
  590.         )
  591.     )
  592.     (or
  593.         (goal siege-available YES)
  594.         (town-under-attack)
  595.     )
  596. =>
  597.     (train skirmisher-line)
  598. )
  599.  
  600. (defrule
  601.     (unit-type-count-total skirmisher-line < 1)
  602.     (can-train skirmisher-line)
  603.     (or
  604.         (or
  605.             (cc-players-unit-type-count any-enemy longbowman-line >= five-percent-pop)
  606.             (cc-players-unit-type-count any-enemy chu-ko-nu-line >= five-percent-pop)
  607.         )
  608.         (or
  609.             (cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
  610.             (cc-players-unit-type-count any-enemy janissary-line >= five-percent-pop)
  611.         )
  612.     )
  613.     (or
  614.         (goal siege-available YES)
  615.         (town-under-attack)
  616.     )
  617. =>
  618.     (train skirmisher-line)
  619. )
  620.  
  621. (defrule
  622.     (unit-type-count-total skirmisher-line < five-percent-pop)
  623.     (can-train skirmisher-line)
  624.     (or
  625.         (or
  626.             (cc-players-unit-type-count any-enemy archer-line >= ten-percent-pop)
  627.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  628.         )
  629.         (or
  630.             (cc-players-unit-type-count any-enemy skirmisher-line >= ten-percent-pop)
  631.             (cc-players-unit-type-count any-enemy hand-cannoneer >= ten-percent-pop)
  632.         )
  633.     )
  634.     (or
  635.         (goal siege-available YES)
  636.         (town-under-attack)
  637.     )
  638. =>
  639.     (train skirmisher-line)
  640. )
  641.  
  642. (defrule
  643.     (unit-type-count-total skirmisher-line < five-percent-pop)
  644.     (can-train skirmisher-line)
  645.     (or
  646.         (or
  647.             (cc-players-unit-type-count any-enemy longbowman-line >= ten-percent-pop)
  648.             (cc-players-unit-type-count any-enemy chu-ko-nu-line >= ten-percent-pop)
  649.         )
  650.         (or
  651.             (cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
  652.             (cc-players-unit-type-count any-enemy janissary-line >= ten-percent-pop)
  653.         )
  654.     )
  655.     (or
  656.         (goal siege-available YES)
  657.         (town-under-attack)
  658.     )
  659. =>
  660.     (train skirmisher-line)
  661. )
  662.  
  663. (defrule
  664.     (unit-type-count-total light-cavalry < 1)
  665.     (can-train light-cavalry)
  666.     (or
  667.         (or
  668.             (cc-players-unit-type-count any-enemy archer-line >= five-percent-pop)
  669.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  670.         )
  671.         (or
  672.             (cc-players-unit-type-count any-enemy skirmisher-line >= five-percent-pop)
  673.             (cc-players-unit-type-count any-enemy monk >= five-percent-pop)
  674.         )
  675.     )
  676.     (or
  677.         (goal siege-available YES)
  678.         (town-under-attack)
  679.     )
  680. =>
  681.     (train light-cavalry)
  682. )
  683.  
  684. (defrule
  685.     (unit-type-count-total light-cavalry <= five-percent-pop)
  686.     (can-train light-cavalry)
  687.     (or
  688.         (or
  689.             (cc-players-unit-type-count any-enemy archer-line >= ten-percent-pop)
  690.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  691.         )
  692.         (or
  693.             (cc-players-unit-type-count any-enemy skirmisher-line >= ten-percent-pop)
  694.             (cc-players-unit-type-count any-enemy monk >= ten-percent-pop)
  695.         )
  696.     )
  697.     (or
  698.         (goal siege-available YES)
  699.         (town-under-attack)
  700.     )
  701. =>
  702.     (train light-cavalry)
  703. )
  704.  
  705. ;**********************************
  706. ;monks
  707. ;decide who is to be the monk-builder par excellence. 
  708.  
  709. (defrule
  710.     (goal monk-rating GOOD)
  711.     (difficulty <= moderate)
  712.     (taunt-detected any-ally 230)
  713. =>
  714.     (set-goal monk-rating FAIR)
  715.     (acknowledge-taunt this-any-ally 230)
  716.     (disable-self)
  717. )
  718.  
  719. (defrule
  720.     (taunt-detected any-ally 230)
  721.     (difficulty <= moderate)
  722.     (or
  723.         (goal monk-rating FAIR)
  724.         (goal monk-rating POOR)
  725.     )
  726. =>
  727.     (set-goal monk-rating NO)
  728.     (acknowledge-taunt this-any-ally 230)
  729.     (disable-self)
  730. )
  731.  
  732. (defrule
  733.     (goal monk-rating GOOD)
  734.     (difficulty <= moderate)
  735.     (game-time >= 600)
  736.     (player-computer any-ally)
  737. =>
  738.     (chat-to-player-using-id every-ally 22409)    ;230
  739.     (disable-self)
  740. )
  741.  
  742. (defrule
  743.     (goal monk-rating FAIR)
  744.     (difficulty <= moderate)
  745.     (game-time >= 700)
  746.     (player-computer any-ally)
  747. =>
  748.     (set-goal monk-rating GOOD)
  749.     (chat-to-player-using-id every-ally 22409)    ;230
  750.     (disable-self)
  751. )
  752.  
  753. (defrule
  754.     (goal siege-available YES)
  755.     (soldier-count >= five-percent-pop)
  756.     (unit-type-count-total monk < 1)
  757.     (can-train monk)
  758.     (not (goal monk-rating NO) )
  759. =>
  760.     (train monk)
  761. )
  762.  
  763. ;make a few monks 
  764. (defrule
  765.     (goal siege-available YES)
  766.     (soldier-count > ten-percent-pop)
  767.     (difficulty <= moderate)
  768.     (unit-type-count-total monk < five-percent-pop)
  769.     (or
  770.         (goal monk-rating GOOD)
  771.         (and
  772.             (goal monk-rating FAIR)
  773.             (gold-amount >= 300)
  774.         )
  775.     )
  776.     (can-train monk)
  777. =>
  778.     (train monk)
  779. )
  780.  
  781. ;make more monks
  782. (defrule
  783.     (goal siege-available YES)
  784.     (soldier-count > ten-percent-pop)
  785.     (current-age == imperial-age)
  786.     (difficulty <= moderate)
  787.     (unit-type-count-total monk < ten-percent-pop)
  788.     (or
  789.         (goal monk-rating GOOD)
  790.         (and
  791.             (goal monk-rating FAIR)
  792.             (gold-amount >= 300)
  793.         )
  794.     )
  795.     (can-train monk)
  796. =>
  797.     (train monk)
  798. )
  799.  
  800. ;if we have lots of gold, build monks sans restraint
  801. (defrule
  802.     (goal siege-available YES)
  803.     (goal monk-rating GOOD)
  804.     (difficulty <= moderate)
  805.     (soldier-count > ten-percent-pop)
  806.     (gold-amount >= 300)
  807.     (unit-type-count-total monk < fifteen-percent-pop)
  808.     (can-train monk)
  809. =>
  810.     (train monk)
  811. )
  812. ;************************************************
  813.